﻿namespace UnitBox {
	public static class Swap {

		#region public methods

		/// <summary>
		/// Configures the next creation of the given type to be swapped out with another object. 
		/// </summary>
		/// <typeparam name="T">the type for which to swap the next creation of</typeparam>
		/// <returns></returns>
		public static SwapNextInstanceConfiguration<T> NextInstanceOf<T>() {
			return SwapNextInstanceConfiguration<T>.Instance;
		}


		/// <summary>
		/// Returns whether a swap was performed that returned the given instance.
		/// </summary>
		/// <typeparam name="T"></typeparam>
		/// <param name="instanceExpectedToHaveBeenSwapped"></param>
		/// <returns></returns>
		public static bool WasMadeWith<T>( T instanceExpectedToHaveBeenSwapped ) {
			return SwapQueue.WasSwapped( instanceExpectedToHaveBeenSwapped );
		}

		#endregion

	}
}
